package com.turing.data.model.dto.produre;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.turing.common.entity.SmbInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @Description 拉取文件dto
 * @Author lcy
 * @Date 2021/7/12 17:56
 */
@ApiModel(value = "拉取文件dto")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class PullFileDto extends SmbInfo {

    @ApiModelProperty(value = "文件校验方式,为空表示绝对路径，last_update:根据最后修改日期查找，date:根据日期")
    private String checkType;

    @ApiModelProperty(value = "场景id")
    private String templateId;

    @ApiModelProperty(value = "场景名称")
    private String templateName;

    @ApiModelProperty(value = "前段路径")
    private String prefixPath;

    @ApiModelProperty(value = "后段路径，如果是路径是/xxx/xxx/date/123，可以将123路径匹配上")
    private String suffixPath = "";

    @ApiModelProperty(value = "文件取时间的格式")
    private String dateFormat = "yyyyMMdd";

    @ApiModelProperty(value = "指定日期")
    private String date;

    @ApiModelProperty(value = "开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;

    @ApiModelProperty(value = "结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    @ApiModelProperty(value = "过滤条件，如果有多个条件用||隔开")
    private String searchPattern = "*";

    @ApiModelProperty(value = "文件类型，如果有多个条件用,隔开")
    private String fileType;

    @ApiModelProperty(value = "是否需要合并抽取")
    private boolean needMerge = false;

    @ApiModelProperty(value = "需要合并抽取的时候，通过||隔开抽取的文件")
    private String mergeFileName;

}
